package com.validator;

import java.io.File;

import com.opensymphony.xwork2.validator.ValidationException;
import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;

public class IsImageUpload  extends FieldValidatorSupport{
	private File order_add;
	private String order_addFileName;
	@Override
	public void validate(Object o) throws ValidationException {
		Object objUploadFileName = getFieldValue(order_addFileName, o);
		String fieldName = getFieldName();
		File fieldValue = (File) getFieldValue(fieldName, o);
		if (fieldValue == null) {
			addFieldError(fieldName, o);
		}
	}
	public File getOrder_add() {
		return order_add;
	}
	public void setOrder_add(File order_add) {
		this.order_add = order_add;
	}
	public String getOrder_addFileName() {
		return order_addFileName;
	}
	public void setOrder_addFileName(String order_addFileName) {
		this.order_addFileName = order_addFileName;
	}
	
	
	
	

}
